package net.labdemo.common.entity;

import java.io.Serializable;
import java.util.Date;

import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;

import net.labdemo.common.util.Page;
import net.labdemo.entity.Article;
import net.labdemo.entity.Refer;
import net.labdemo.entity.User;
/**
 * 抽像的实体基类
 * @author xiaofanku
 * 20160613
 * @param <T>
 */
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@XmlSeeAlso({Article.class,User.class,Refer.class})
public abstract class BaseEntity<T> implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 主键
	 */
	@XmlElement
	private long id;
	/**
	 * 状态
	 * 1可用,2锁定,3异常,4冰封
	 */
	@XmlElement
	private int status;
	/**
	 * 创建者的ip
	 */
	@XmlTransient
	private String ip;
	/**
	 * 创建的日期
	 */
	@XmlTransient
	private Date createDate;
	/**
	 * 分页查询载体
	 */
	@XmlTransient
	private Page<T> page;
	
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public Page<T> getPage() {
		return page;
	}
	public void setPage(Page<T> page) {
		this.page = page;
	}
	
}
